package com.zys.exercise;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class text4 {
    public static void main(String[] args) throws IOException {
        FileInputStream fi = new FileInputStream("4-23\\text1");
        FileOutputStream fo = new FileOutputStream("4-23\\text2");
        byte[] bytes = new byte[2];
        int len;
        while (( len = fi.read(bytes))!=-1){

            fo.write(bytes,0,len);
        }
        fo.close();
        fi.close();
    }
}
